<!-- php:$title = '订单信息：'.$rs.sn --><!-- include tpl=header title=$title -->
<script type="text/javascript">
function order_payment(orderid,passwd)
{
	if(passwd && passwd != 'undefined'){
		var url = get_url('order','payment','sn='+orderid+"&passwd="+passwd);
	}else{
		var url = get_url('order','payment','id='+orderid);
	}
	$.phpok.go(url);
}
</script>
<section class="container"><div class="mt-3"><!-- include tpl=block/breadcrumb --></div></section>
<section class="container">
	<div class="card">
		<div class="card-header">订单基本信息</div>
		<ul class="list-group list-group-flush">
			<li class="list-group-item">
				<div class="row">
					<div class="col-sm-4 text-right">订单编号：</div>
					<div class="col-sm-8">{$rs.sn}</div>
				</div>
			</li>
			<li class="list-group-item">
				<div class="row">
					<div class="col-sm-4 text-right">下单时间：</div>
					<div class="col-sm-8">{func time_format $rs.addtime}</div>
				</div>
			</li>
			<li class="list-group-item">
				<div class="row">
					<div class="col-sm-4 text-right">订单金额：</div>
					<div class="col-sm-8">{func price_format $rs.price $rs.currency_id}</div>
				</div>
			</li>
			<li class="list-group-item">
				<div class="row">
					<div class="col-sm-4 text-right">订单状态：</div>
					<div class="col-sm-8">{$rs.status_info}</div>
				</div>
			</li>
			<!-- if $rs.email -->
			<li class="list-group-item">
				<div class="row">
					<div class="col-sm-4 text-right">邮箱：</div>
					<div class="col-sm-8">{$rs.email}</div>
				</div>
			</li>
			<!-- /if -->
			<!-- if $rs.mobile -->
			<li class="list-group-item">
				<div class="row">
					<div class="col-sm-4 text-right">手机号：</div>
					<div class="col-sm-8">{$rs.mobile}</div>
				</div>
			</li>
			<!-- /if -->
			<!-- if $invoice -->
			<li class="list-group-item">
				<div class="row">
					<div class="col-sm-4 text-right">发票信息：</div>
					<div class="col-sm-8">{$invoice.type}，抬头：<span class="am-text-danger">{$invoice.title}</span>，内容：<span class="am-text-danger">{$invoice.content}</span></div>
				</div>
			</li>
			<!-- /if -->
			<!-- loop from=$rs.ext key=$key value=$value id=$tmpid -->
			<li class="list-group-item">
				<div class="row">
					<div class="col-sm-4 text-right">{$key}：</div>
					<div class="col-sm-8">{$value}</div>
				</div>
			</li>
			<!-- /loop -->
			<!-- if $rs.note -->
			<li class="list-group-item">
				<div class="row">
					<div class="col-sm-4 text-right">备注：</div>
					<div class="col-sm-8">{func nl2br $rs.note}</div>
				</div>
			</li>
			<!-- /if -->
		</ul>
	</div>
	<!-- if $address -->
	<div class="card mt-3">
		<div class="card-header">收件人信息</div>
		<ul class="list-group list-group-flush">
			<li class="list-group-item">
				<div class="row">
					<div class="col-sm-4 text-right">姓名：</div>
					<div class="col-sm-8"><!-- if $address.fullname -->{$address.fullname}<!-- else -->{$address.lastname}{$address.firstname}<!-- /if --></div>
				</div>
			</li>
			<li class="list-group-item">
				<div class="row">
					<div class="col-sm-4 text-right">地址：</div>
					<div class="col-sm-8">
						{$address.province}
						<!-- if $address.province != $address.city -->
						{$address.city}
						<!-- /if -->
						{$address.county}
						{$address.address}
						<!-- if $address.address2 -->{$address.address2}<!-- /if -->
						<!-- if $address.zipcode --><i>（邮编：{$address.zipcode}）</i><!-- /if -->
					</div>
				</div>
			</li>
			<li class="list-group-item">
				<div class="row">
					<div class="col-sm-4 text-right">联系方式：</div>
					<div class="col-sm-8">{$address.tel}<!-- if $address.tel && $address.mobile --> / <!-- /if -->{$address.mobile}</div>
				</div>
			</li>
			<!-- if $address.email -->
			<li class="list-group-item">
				<div class="row">
					<div class="col-sm-4 text-right">邮箱 Email：</div>
					<div class="col-sm-8">{$address.email}</div>
				</div>
			</li>
			<!-- /if -->
		</ul>
	</div>
	<!-- /if -->
	<!-- if $billing -->
	<div class="card mt-3">
		<div class="card-header">账单信息</div>
		<ul class="list-group list-group-flush">
			<li class="list-group-item">
				<div class="row">
					<div class="col-sm-4 text-right">姓名：</div>
					<div class="col-sm-8"><!-- if $billing.fullname -->{$billing.fullname}<!-- else -->{$billing.lastname}{$billing.firstname}<!-- /if --></div>
				</div>
			</li>
			<li class="list-group-item">
				<div class="row">
					<div class="col-sm-4 text-right">地址：</div>
					<div class="col-sm-8">
						{$billing.province}
						<!-- if $billing.province != $billing.city -->
						{$billing.city}
						<!-- /if -->
						{$billing.county}
						{$billing.address}
						<!-- if $billing.address2 -->{$billing.address2}<!-- /if -->
						<!-- if $billing.zipcode --><i>（邮编：{$billing.zipcode}）</i><!-- /if -->
					</div>
				</div>
			</li>
			<li class="list-group-item">
				<div class="row">
					<div class="col-sm-4 text-right">联系方式：</div>
					<div class="col-sm-8">{$billing.tel}<!-- if $billing.tel && $billing.mobile --> / <!-- /if -->{$billing.mobile}</div>
				</div>
			</li>
			<!-- if $billing.email -->
			<li class="list-group-item">
				<div class="row">
					<div class="col-sm-4 text-right">邮箱 Email：</div>
					<div class="col-sm-8">{$billing.email}</div>
				</div>
			</li>
			<!-- /if -->
		</ul>
	</div>
	<!-- /if -->

	<div class="card mt-3">
		<div class="card-header">产品信息</div>
		<table class="table">
			<thead>
				<tr>
					<th>图片</th>
					<th>产品信息</th>
					<th>购买数量</th>
					<th>价格</th>
				</tr>
			</thead>
			<tbody>
				<!-- loop from=$rslist key=$key value=$value -->
				<tr>
					<td>
						<!-- if $value.thumb && file_exists($value.thumb) -->
						<img src="{$value.thumb}" width="80" height="80" border="0" />
						<!-- else -->
						<img src="{#images#}/blank.gif" width="80" height="80" border="0" />
						<!-- /if -->
					</td>
					<td>
						<div><b>{$value.title}</b></div>
						<!-- loop from=$value.ext key=$k value=$v id=$tmpid -->
						<div>{$v.title}：{$v.content}</div>
						<!-- /loop -->
						<div>售价：{func price_format $value.price $rs.currency_id $rs.currency_id}</div>
					</td>
					<td>{$value.qty}</td>
					<td>{func price_format $value.price*$value.qty $rs.currency_id $rs.currency_id}</td>
				</tr>
				<!-- /loop -->
			</tbody>
		</table>
	</div>

	<div class="card mt-3">
		<div class="card-header">价格明细</div>
		<div class="am-panel-bd">
			<ul class="list-group list-group-flush">
				<!-- loop from=$pricelist key=$key value=$value id=$tmpid -->
				<li class="list-group-item">
					<div class="row">
						<div class="col-sm-10 am-text-right">{$value.title}</div>
						<div class="col-sm-2 am-text-danger">{$value.price}</div>
					</div>
				</li>
				<!-- /loop -->
				<li class="list-group-item">
					<div class="row">
						<div class="col-sm-10 am-text-right">总价</div>
						<div class="col-sm-2 am-text-danger">{func price_format $rs.price $rs.currency_id $rs.currency_id}</div>
					</div>
				</li>
			</ul>
		</div>
	</div>
	<!-- if $loglist -->
	<div class="card mt-3">
		<div class="card-header">订单日志</div>
		<table class="table">
			<thead>
				<tr>
					<th>说明</th>
					<th>时间</th>
					<th>操作人</th>
				</tr>
			</thead>
			<tbody>
				<!-- loop from=$loglist key=$key value=$value id=$tmpid -->
				<tr>
					<td>{$value.note}</td>
					<td>{func time_format $value.addtime}</td>
					<td>{$value.who}</td>
				</tr>
				<!-- /loop -->
			</tbody>
		</table>
	</div>
	<!-- /if -->
	

	<!-- if !$pay_end -->
	<div class="p-4 m-4 text-center">
		<!-- if $session.user_id -->
		<a href="{url ctrl=order func=payment id=$rs.id/}" class="btn btn-primary btn-lg">在线支付</a>
		<!-- else -->
		<a href="{url ctrl=order func=payment sn=$rs.sn passwd=$rs.passwd/}" class="btn btn-primary btn-lg">在线支付</a>
		<!-- /if -->
	</div>
	<!-- /if -->
</section>

<!-- include tpl=footer -->